package Grade;

import java.util.Scanner;

public class StudentNode {

    public int ranking; //序号
    public int number; //学号

    public String name;
    public String sex;
    public double math;
    public double english;
    public double chinese;
    public double sum;

    public StudentNode() {          //无参时的构造函数
        this(0,0,null,null, 0.0, 0.0, 0.0,0.0);
    }

    public StudentNode(int ranking,int number, String name, String sex, double math, double english, double chinese, double sum) {  //有参数时的构造函数
        this.ranking=ranking;
        this.number = number;
        this.name = name;
        this.sex = sex;
        this.math = math;
        this.english = english;
        this.chinese = chinese;
        this.sum = sum;
    }

    public StudentNode(Scanner sc){             //接受键盘输入值
        this(sc.nextInt(),sc.nextInt(),sc.next(),sc.next(), sc.nextDouble(),  sc.nextDouble() ,sc.nextDouble(), sc.nextDouble());
    }


}
